package com.kyivmohyla.kma2.client.events.engineer;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIOrder;

public class EngineerEditOrderEvent extends GwtEvent<EngineerEditOrderEventHandler> {
    public static Type<EngineerEditOrderEventHandler> TYPE = new Type<EngineerEditOrderEventHandler>();
    private UIOrder selectedOrder;

    public UIOrder getSelectedOrder() {
        return selectedOrder;
    }

    public EngineerEditOrderEvent(UIOrder uiOrder) {
        this.selectedOrder = uiOrder;
    }

    public Type<EngineerEditOrderEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(EngineerEditOrderEventHandler handler) {
        handler.onEngineerEditOrder(this);
    }
}
